﻿using BaseRepository.Redis;
using Extensions.Interceptor.Event;
using PLC.Domain.GlobConfig;

namespace PLC.Domain.Events.ServiceEvents;

public class DeleteDeviceCache:IEventHandler
{
    private readonly IRedisRepository _redisRepository;


    public DeleteDeviceCache(IRedisRepository redisRepository)
    {
        _redisRepository = redisRepository?? throw new ArgumentNullException(nameof(redisRepository));
    }
    public string EventName => "DeleteDeviceCache";
    public async Task Handle()
    {
         await _redisRepository.Remove(RedisKey.PLCConfigs);
    }
}